<!-- 提示信息 -->
<app-tip [type]="tipType"></app-tip>
<!--<app-load *ngIf="isLoading"></app-load>-->

<div class="header">
  <div class="left flex left-header-box" [routerLink]="['/main/ess/inventory']" id="btn-back">
    <div class="left-icon">
      <i class="fa fa-angle-left back-icon" aria-hidden="true"></i>
    </div>
    <div class="left-name">
      <span class="back-name">返回</span>
    </div>
  </div>
  <div class="center">新增库存</div>
</div>

<div class="main">
  <form>
    <div class="yami-form">
      <div class="yami-form-item">
        <label class="yami-label">选择物料</label>
        <div class="yami-input-block">
          <div class="select-box">
            <div class="search-select" style="display: inline-block" (click)="isShowList($event)">{{editInfo['ms.name']}}</div>
            <div class="search-box" [hidden]="!showList">
              <input type="text" #inp class="search-input" placeholder="搜索关键字" (input)="searchKey($event, inp)">
              <!--<i class="fa fa-search"></i>-->
            </div>
            <ul class="chooseList" [hidden]="!showList">
              <li (click)="clearChoose()">选择</li>
              <li *ngFor="let v of matList" (click)="chooseRes(v)" [hidden]="v.hide">{{v.name}}</li>
            </ul>
          </div>
        </div>
      </div>
      <div class="yami-form-item">
        <label class="yami-label">单位</label>
        <div class="yami-input-block">
          <select class="yami-select" name="unit" [(ngModel)]="editInfo['ms.unit']">
            <option *ngFor="let v of unitList" [value]="v.unit">{{v.unit}}</option>
          </select>
        </div>
      </div>
      <div class="yami-form-item">
        <label class="yami-label">数量</label>
        <div class="yami-input-block">
          <input type="number" name="num" class="yami-input" autocomplete="off" maxlength="25" [(ngModel)]="editInfo['ms.num']">
        </div>
      </div>
      <div class="yami-form-item">
        <label class="yami-label">金额</label>
        <div class="yami-input-block">
          <input type="number" name="price" class="yami-input" autocomplete="off" maxlength="25" [(ngModel)]="editInfo['price']">
        </div>
      </div>
      <div class="yami-form-item">
        <label class="yami-label">入库人</label>
        <div class="yami-input-block">
          <input type="text" name="instockname" class="yami-input" autocomplete="off" maxlength="25" [(ngModel)]="editInfo['instockname']">
        </div>
      </div>
    </div>
  </form>

  <!--提交-->
  <div style="padding: 0 1em 1em 1em;margin-top: 1em;">
    <div class="btn-submit" (click)="save()">保存</div>
  </div>
</div>
